package bhbt.controller.admin.kuang;


import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import bhbt.controller.core.BaseController;
import bhbt.service.log.LogKuangService;
import bhbt.taglib.pagetag.Pagination;
import bhbt.utils.MapUtil;






/**
 * Created by Administrator on 2016/3/25.
 */
@Controller

public class LogKuangListController extends BaseController {
    @Resource
    private LogKuangService logKuangService;
   
   
    @RequestMapping("admin/kuang/logKuangYesActiveList.shtml")
    public String list(HttpServletRequest request) throws Exception{
        HashMap formMap = getParameterMap(request);
       
        String loginNameDiy=MapUtil.getString(formMap, "loginNameDiy");
        
    	/*if(loginNameDiy!=null&&loginNameDiy!=""){
    		formMap.put("where", " 1=1 and b.loginName like '%"+loginNameDiy+"%'");			//未激活
    	}else{
    		formMap.put("where", " 1=1 and isActive='T' and b.loginName like '%"+loginNameDiy+"%'");			//未激活
    	}*/
    	 
    	formMap.put("isActive","T");
        formMap.put("pagination.orderBy"," a.id desc");  //排列
        Pagination page = logKuangService.queryForPageList("logKuangForPage",formMap);
        request.setAttribute(Pagination.pageBeanName, page);
        return "admin/kuang/logKuangYesActiveList";
    }
    
    
    @RequestMapping("admin/kuang/logKuangNoActiveList.shtml")
    public String listNo(HttpServletRequest request) throws Exception{
        HashMap formMap = getParameterMap(request);
         
        
    	formMap.put("isActive","F");
        formMap.put("pagination.orderBy"," a.id desc");  //排列
        Pagination page = logKuangService.queryForPageList("logKuangForPage",formMap);
        request.setAttribute(Pagination.pageBeanName, page);
        return "admin/kuang/logKuangNoActiveList";
    }

    
}
